package cn.itcast.user.controller;

import cn.itcast.hmall.pojo.user.Address;
import cn.itcast.user.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("address2")
public class AddController {
    @Autowired
    private AddressService addressService;
    @GetMapping("/{addressId}")
    public Address findAdd(@PathVariable Long addressId){
        return addressService.findAdd(addressId);
    }
}
